home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / bit_res.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-19  |  555 b   |  37 lines

  1. /* bit_res.h
  2.  
  3.     Declarations for Bit Reservoir for Layer III
  4.  
  5.    Adapted from the public c code by Jeff Tsay. */
  6.  
  7.  
  8. #ifndef BIT_RES_H
  9. #define BIT_RES_H
  10.  
  11. #include "all.h"
  12.  
  13. #define BUFSIZE 4096
  14.  
  15. class Bit_Reserve {
  16.  
  17. private:
  18.  
  19.     uint32 offset, totbit, buf_byte_idx;
  20.     uint32 *buf;
  21.     uint32 buf_bit_idx;
  22.    uint32 *putmask;
  23.  
  24. public:
  25.  
  26.     Bit_Reserve();
  27.     ~Bit_Reserve();
  28.  
  29.     uint32 hsstell() { return(totbit); }
  30.     uint32 hgetbits(uint32 N);
  31.     void hputbuf(int32 val);
  32.  
  33.     void rewindNbits(int32 N);
  34.     void rewindNbytes(int32 N);
  35. };
  36.  
  37. #endif